mysite_add_page

Definition

mysite_add_page($uid)
mysite.module, line 1272

Description

Adds a new page to the user collection and takes them to the settings form for that page.

Parameters

$uid The user id of the MySite collection owner.

Code

function mysite_add_page($uid) {
  $pages = mysite_get_pages($uid);
  $count = count($pages);
  if ($count < variable_get('mysite_pages', 5)) {
    mysite_create_page($uid, $count);
    drupal_goto('mysite/'. $uid .'/edit/'. $count);
  }
}