@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function render($short = null) |
| 44 | 44 | { |
| 45 | - $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') ); |
|
| 45 | + $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config')); |
|
| 46 | 46 | if ($short === true) { |
| 47 | 47 | return $config->get('app')->get('short_title'); |
| 48 | 48 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function render($container = null) |
| 43 | 43 | { |
| 44 | - $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') ); |
|
| 44 | + $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config')); |
|
| 45 | 45 | return $config->get('app')->get('favicon'); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function render($container = null) |
| 44 | 44 | { |
| 45 | - $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') ); |
|
| 45 | + $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config')); |
|
| 46 | 46 | return $config; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -21,14 +21,14 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | abstract class ClassnameCollectionAbstract { |
| 23 | 23 | |
| 24 | - /** @var string $framework framework names, these classnames are related to */ |
|
| 25 | - public $framework = "Bootstrap"; |
|
| 24 | + /** @var string $framework framework names, these classnames are related to */ |
|
| 25 | + public $framework = "Bootstrap"; |
|
| 26 | 26 | |
| 27 | - /** @var string $version framework version, these classnames are related to */ |
|
| 28 | - public $version = "3.3.0"; |
|
| 27 | + /** @var string $version framework version, these classnames are related to */ |
|
| 28 | + public $version = "3.3.0"; |
|
| 29 | 29 | |
| 30 | - /** @var array $size generic sizes */ |
|
| 31 | - public $size = array( |
|
| 30 | + /** @var array $size generic sizes */ |
|
| 31 | + public $size = array( |
|
| 32 | 32 | "xs" => "xs", |
| 33 | 33 | "s" => "s", |
| 34 | 34 | "m" => "m", |
@@ -36,9 +36,9 @@ discard block |
||
| 36 | 36 | "xl" => "xl", |
| 37 | 37 | ); |
| 38 | 38 | |
| 39 | - /** @var array $column generic column classname */ |
|
| 39 | + /** @var array $column generic column classname */ |
|
| 40 | 40 | public $column = "columns"; |
| 41 | - /** @var array $columnsize column sizes classnames*/ |
|
| 41 | + /** @var array $columnsize column sizes classnames*/ |
|
| 42 | 42 | public $columnsize = array( |
| 43 | 43 | "xs" => "col-xs-", |
| 44 | 44 | "s" => "col-s-", |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | "xl" => "col-xl-", |
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | - /** @var array $status status related classnames */ |
|
| 50 | + /** @var array $status status related classnames */ |
|
| 51 | 51 | public $status = array( |
| 52 | 52 | "default" => "default", |
| 53 | 53 | "info" => "info", |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | "error" => "error", |
| 58 | 58 | ); |
| 59 | 59 | |
| 60 | - /** @var array $panel panel related classnames */ |
|
| 60 | + /** @var array $panel panel related classnames */ |
|
| 61 | 61 | public $panel = array( |
| 62 | 62 | "prefix" => "panel-", |
| 63 | 63 | "wrapper" => "panel", |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | "footer" => "panel-footer", |
| 67 | 67 | ); |
| 68 | 68 | |
| 69 | - /** @var array $control control related classnames */ |
|
| 69 | + /** @var array $control control related classnames */ |
|
| 70 | 70 | public $control = array( |
| 71 | 71 | "button" => array( |
| 72 | 72 | "prefix" => "btn-", |
@@ -77,18 +77,18 @@ discard block |
||
| 77 | 77 | ), |
| 78 | 78 | ); |
| 79 | 79 | |
| 80 | - /** @var array $form form generation related classnames */ |
|
| 80 | + /** @var array $form form generation related classnames */ |
|
| 81 | 81 | public $form = array( |
| 82 | 82 | "formgroup" => array( |
| 83 | 83 | "wrapper" => "form-group", |
| 84 | 84 | ), |
| 85 | 85 | ); |
| 86 | 86 | |
| 87 | - /** @var array $table table related classnames */ |
|
| 87 | + /** @var array $table table related classnames */ |
|
| 88 | 88 | public $table = array( |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | - /** @var array $widget widgets' classnames */ |
|
| 91 | + /** @var array $widget widgets' classnames */ |
|
| 92 | 92 | public $widget = array( |
| 93 | 93 | "navigation" => array( |
| 94 | 94 | "wrapper" => "navbar navbar-inverse", |
@@ -113,12 +113,12 @@ discard block |
||
| 113 | 113 | ), |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | - /** |
|
| 117 | - * create classname collection object |
|
| 118 | - * @see \Zend\Config\Config |
|
| 119 | - */ |
|
| 120 | - public function __contruct() { |
|
| 121 | - return new \Zend\Config\Config( get_object_vars($this) ); |
|
| 122 | - } |
|
| 116 | + /** |
|
| 117 | + * create classname collection object |
|
| 118 | + * @see \Zend\Config\Config |
|
| 119 | + */ |
|
| 120 | + public function __contruct() { |
|
| 121 | + return new \Zend\Config\Config( get_object_vars($this) ); |
|
| 122 | + } |
|
| 123 | 123 | |
| 124 | 124 | } |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | * @see \Zend\Config\Config |
| 119 | 119 | */ |
| 120 | 120 | public function __contruct() { |
| 121 | - return new \Zend\Config\Config( get_object_vars($this) ); |
|
| 121 | + return new \Zend\Config\Config(get_object_vars($this)); |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | } |
@@ -21,13 +21,13 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | class Bootstrap3 extends ClassnameCollectionAbstract { |
| 23 | 23 | |
| 24 | - /** @var string $framework framework names, these classnames are related to */ |
|
| 25 | - public $framework = "Bootstrap"; |
|
| 24 | + /** @var string $framework framework names, these classnames are related to */ |
|
| 25 | + public $framework = "Bootstrap"; |
|
| 26 | 26 | |
| 27 | - /** @var string $version framework version, these classnames are related to */ |
|
| 28 | - public $version = "3.3.0"; |
|
| 27 | + /** @var string $version framework version, these classnames are related to */ |
|
| 28 | + public $version = "3.3.0"; |
|
| 29 | 29 | |
| 30 | - /** @var array $size generic sizes */ |
|
| 30 | + /** @var array $size generic sizes */ |
|
| 31 | 31 | public $size = array( |
| 32 | 32 | "xs" => "xs", |
| 33 | 33 | "s" => "s", |
@@ -36,9 +36,9 @@ discard block |
||
| 36 | 36 | "xl" => "xl", |
| 37 | 37 | ); |
| 38 | 38 | |
| 39 | - /** @var array $column generic column classname */ |
|
| 39 | + /** @var array $column generic column classname */ |
|
| 40 | 40 | public $column = "columns"; |
| 41 | - /** @var array $columnsize column sizes classnames*/ |
|
| 41 | + /** @var array $columnsize column sizes classnames*/ |
|
| 42 | 42 | public $columnsize = array( |
| 43 | 43 | "xs" => "col-xs-", |
| 44 | 44 | "s" => "col-s-", |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | "xl" => "col-xl-", |
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | - /** @var array $status status related classnames */ |
|
| 50 | + /** @var array $status status related classnames */ |
|
| 51 | 51 | public $status = array( |
| 52 | 52 | "default" => "default", |
| 53 | 53 | "info" => "info", |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | "error" => "error", |
| 58 | 58 | ); |
| 59 | 59 | |
| 60 | - /** @var array $panel panel related classnames */ |
|
| 60 | + /** @var array $panel panel related classnames */ |
|
| 61 | 61 | public $panel = array( |
| 62 | 62 | "prefix" => "panel-", |
| 63 | 63 | "wrapper" => "panel", |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | "footer" => "panel-footer", |
| 67 | 67 | ); |
| 68 | 68 | |
| 69 | - /** @var array $control control related classnames */ |
|
| 69 | + /** @var array $control control related classnames */ |
|
| 70 | 70 | public $control = array( |
| 71 | 71 | "button" => array( |
| 72 | 72 | "prefix" => "btn-", |
@@ -77,18 +77,18 @@ discard block |
||
| 77 | 77 | ), |
| 78 | 78 | ); |
| 79 | 79 | |
| 80 | - /** @var array $form form generation related classnames */ |
|
| 80 | + /** @var array $form form generation related classnames */ |
|
| 81 | 81 | public $form = array( |
| 82 | 82 | "formgroup" => array( |
| 83 | 83 | "wrapper" => "form-group", |
| 84 | 84 | ), |
| 85 | 85 | ); |
| 86 | 86 | |
| 87 | - /** @var array $table table related classnames */ |
|
| 87 | + /** @var array $table table related classnames */ |
|
| 88 | 88 | public $table = array( |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | - /** @var array $widget widgets' classnames */ |
|
| 91 | + /** @var array $widget widgets' classnames */ |
|
| 92 | 92 | public $widget = array( |
| 93 | 93 | "navigation" => array( |
| 94 | 94 | "wrapper" => "navbar navbar-inverse", |
@@ -21,13 +21,13 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | class Foundation6 extends ClassnameCollectionAbstract { |
| 23 | 23 | |
| 24 | - /** @var string $framework framework names, these classnames are related to */ |
|
| 25 | - public $framework = "Foundation"; |
|
| 24 | + /** @var string $framework framework names, these classnames are related to */ |
|
| 25 | + public $framework = "Foundation"; |
|
| 26 | 26 | |
| 27 | - /** @var string $version framework version, these classnames are related to */ |
|
| 28 | - public $version = "6.1.2"; |
|
| 27 | + /** @var string $version framework version, these classnames are related to */ |
|
| 28 | + public $version = "6.1.2"; |
|
| 29 | 29 | |
| 30 | - /** @var array $size generic sizes */ |
|
| 30 | + /** @var array $size generic sizes */ |
|
| 31 | 31 | public $size = array( |
| 32 | 32 | "xs" => "tiny", |
| 33 | 33 | "s" => "small", |
@@ -36,9 +36,9 @@ discard block |
||
| 36 | 36 | "xl" => "xlarge", |
| 37 | 37 | ); |
| 38 | 38 | |
| 39 | - /** @var array $column generic column classname */ |
|
| 39 | + /** @var array $column generic column classname */ |
|
| 40 | 40 | public $column = "columns"; |
| 41 | - /** @var array $columnsize column sizes classnames*/ |
|
| 41 | + /** @var array $columnsize column sizes classnames*/ |
|
| 42 | 42 | public $columnsize = array( |
| 43 | 43 | "xs" => "tiny-", |
| 44 | 44 | "s" => "small-", |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | "xl" => "xlargel-", |
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | - /** @var array $status status related classnames */ |
|
| 50 | + /** @var array $status status related classnames */ |
|
| 51 | 51 | public $status = array( |
| 52 | 52 | "default" => "", |
| 53 | 53 | "info" => "info", |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | "error" => "alert", |
| 58 | 58 | ); |
| 59 | 59 | |
| 60 | - /** @var array $panel panel related classnames */ |
|
| 60 | + /** @var array $panel panel related classnames */ |
|
| 61 | 61 | public $panel = array( |
| 62 | 62 | "prefix" => "panel-", |
| 63 | 63 | "wrapper" => "panel", |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | "footer" => "panel-footer", |
| 67 | 67 | ); |
| 68 | 68 | |
| 69 | - /** @var array $control control related classnames */ |
|
| 69 | + /** @var array $control control related classnames */ |
|
| 70 | 70 | public $control = array( |
| 71 | 71 | "button" => array( |
| 72 | 72 | "prefix" => "button-", |
@@ -77,18 +77,18 @@ discard block |
||
| 77 | 77 | ), |
| 78 | 78 | ); |
| 79 | 79 | |
| 80 | - /** @var array $form form generation related classnames */ |
|
| 80 | + /** @var array $form form generation related classnames */ |
|
| 81 | 81 | public $form = array( |
| 82 | 82 | "formgroup" => array( |
| 83 | 83 | "wrapper" => "form-group", |
| 84 | 84 | ), |
| 85 | 85 | ); |
| 86 | 86 | |
| 87 | - /** @var array $table table related classnames */ |
|
| 87 | + /** @var array $table table related classnames */ |
|
| 88 | 88 | public $table = array( |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | - /** @var array $widget widgets' classnames */ |
|
| 91 | + /** @var array $widget widgets' classnames */ |
|
| 92 | 92 | public $widget = array( |
| 93 | 93 | "navigation" => array( |
| 94 | 94 | "wrapper" => "top-bar", |
@@ -23,21 +23,21 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * user's confirmation/activation token |
| 26 | - * |
|
| 26 | + * |
|
| 27 | 27 | * @var string |
| 28 | 28 | */ |
| 29 | 29 | protected $token; |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * user's ACL role |
| 33 | - * |
|
| 33 | + * |
|
| 34 | 34 | * @var string |
| 35 | 35 | */ |
| 36 | 36 | protected $aclrole; |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * user's ID |
| 40 | - * |
|
| 40 | + * |
|
| 41 | 41 | * @var int |
| 42 | 42 | */ |
| 43 | 43 | protected $user_id; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | 120 | * set user's object property data |
| 121 | - * |
|
| 121 | + * |
|
| 122 | 122 | * @param array $data |
| 123 | 123 | * @param boolean $forceEncryptPassword |
| 124 | 124 | * @return \Admin\Entity\User |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | /** |
| 158 | 158 | * get copy of user's object properties in an assosiative array |
| 159 | - * |
|
| 159 | + * |
|
| 160 | 160 | * @return array |
| 161 | 161 | */ |
| 162 | 162 | public function __getArrayCopy() |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | /** |
| 179 | 179 | * get copy of user's object properties in an assosiative array |
| 180 | - * |
|
| 180 | + * |
|
| 181 | 181 | * @return array |
| 182 | 182 | * / |
| 183 | 183 | public function getArrayCopy() |
@@ -125,30 +125,30 @@ |
||
| 125 | 125 | */ |
| 126 | 126 | public function exchangeArray($data = array(), $forceEncryptPassword = false) |
| 127 | 127 | { |
| 128 | - if (isset($data['id']) && !empty($data["id"]) ) { |
|
| 128 | + if (isset($data['id']) && !empty($data["id"])) { |
|
| 129 | 129 | $this->id = ($data['id']); |
| 130 | 130 | $this->user_id = ($data['id']); |
| 131 | - } elseif (isset($data['user_id']) && !empty($data["user_id"]) ) { |
|
| 131 | + } elseif (isset($data['user_id']) && !empty($data["user_id"])) { |
|
| 132 | 132 | $this->id = ($data['user_id']); |
| 133 | 133 | $this->user_id = ($data['user_id']); |
| 134 | 134 | } |
| 135 | - $this->username = (isset($data['username'])) ? $data['username'] : $this->username; |
|
| 136 | - $this->email = (isset($data['email'])) ? $data['email'] : $this->email; |
|
| 137 | - if (isset($data['displayName']) ) { |
|
| 135 | + $this->username = (isset($data['username'])) ? $data['username'] : $this->username; |
|
| 136 | + $this->email = (isset($data['email'])) ? $data['email'] : $this->email; |
|
| 137 | + if (isset($data['displayName'])) { |
|
| 138 | 138 | $this->display_name = $data['displayName']; |
| 139 | 139 | $this->displayName = $data['displayName']; |
| 140 | - } elseif (isset($data['display_name']) ) { |
|
| 140 | + } elseif (isset($data['display_name'])) { |
|
| 141 | 141 | $this->display_name = $data['display_name']; |
| 142 | 142 | $this->displayName = $data['display_name']; |
| 143 | 143 | } |
| 144 | - if (isset($data["password"]) && $forceEncryptPassword ) { |
|
| 144 | + if (isset($data["password"]) && $forceEncryptPassword) { |
|
| 145 | 145 | $bcrypt = new Bcrypt; |
| 146 | 146 | $bcrypt->setCost(null); // @TODO $this->getUserService()->getOptions()->getPasswordCost()); |
| 147 | 147 | $data["password"] = $bcrypt->create($data['password']); |
| 148 | 148 | } |
| 149 | - $this->password = (isset($data['password'])) ? $data['password'] : $this->password; |
|
| 149 | + $this->password = (isset($data['password'])) ? $data['password'] : $this->password; |
|
| 150 | 150 | $this->state = (isset($data['state'])) ? $data['state'] : $this->state; |
| 151 | - $this->aclrole = (isset($data['aclrole'])) ? $data['aclrole'] : $this->aclrole; |
|
| 151 | + $this->aclrole = (isset($data['aclrole'])) ? $data['aclrole'] : $this->aclrole; |
|
| 152 | 152 | $this->token = (isset($data['token'])) ? $data['token'] : $this->token; |
| 153 | 153 | |
| 154 | 154 | return $this; |
@@ -78,11 +78,11 @@ discard block |
||
| 78 | 78 | { |
| 79 | 79 | $tmplVars = $this->getTemplateVars(); |
| 80 | 80 | $aUserlist = $this->getUserTable()->fetchAll(); |
| 81 | - if ( $this->isXHR() ) { |
|
| 81 | + if ($this->isXHR()) { |
|
| 82 | 82 | $datatablesData = array('data' => $aUserlist->toArray()); |
| 83 | 83 | $oController = $this; |
| 84 | 84 | $datatablesData['data'] = array_map( |
| 85 | - function ($row) use ($oController) { |
|
| 85 | + function($row) use ($oController) { |
|
| 86 | 86 | $actions = '<div class="button-group tiny btn-group btn-group-xs">'. |
| 87 | 87 | '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute( |
| 88 | 88 | 'admin/default', |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $user->exchangeArray($form->getData()); |
| 140 | 140 | $this->getUserTable()->saveUser($user); |
| 141 | 141 | $this->flashMessenger()->addSuccessMessage($this->translate("user has been saved")); |
| 142 | - if ( $this->isXHR() ) { |
|
| 142 | + if ($this->isXHR()) { |
|
| 143 | 143 | $tmplVars["showForm"] = false; |
| 144 | 144 | } else { |
| 145 | 145 | return $this->redirect()->toRoute('admin/default', array('controller' => 'users')); |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | return $this->redirect()->toRoute('admin/default', array('controller' => 'users')); |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - $form = new UserForm(); |
|
| 178 | + $form = new UserForm(); |
|
| 179 | 179 | $form->bind($user); |
| 180 | 180 | |
| 181 | 181 | $roles = $this->getAclroleTable()->fetchAll()->toArray(); |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | if ($form->isValid()) { |
| 193 | 193 | $this->getUserTable()->saveUser($user); |
| 194 | 194 | $this->flashMessenger()->addSuccessMessage($this->translate("user has been saved")); |
| 195 | - if ( $this->isXHR() ) { |
|
| 195 | + if ($this->isXHR()) { |
|
| 196 | 196 | $tmplVars["showForm"] = false; |
| 197 | 197 | } else { |
| 198 | 198 | return $this->redirect()->toRoute('admin/default', array('controller' => 'users')); |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | $id = (int) $request->getPost('id'); |
| 241 | 241 | $this->getUserTable()->deleteUser($id); |
| 242 | 242 | $this->flashMessenger()->addSuccessMessage($this->translate("user has been deleted")); |
| 243 | - if ( $this->isXHR() ) { |
|
| 243 | + if ($this->isXHR()) { |
|
| 244 | 244 | $tmplVars["showForm"] = false; |
| 245 | 245 | } else { |
| 246 | 246 | return $this->redirect()->toRoute('admin/default', array('controller' => 'users')); |
@@ -265,23 +265,23 @@ discard block |
||
| 265 | 265 | $config = $this->getServiceLocator()->get('Config'); |
| 266 | 266 | $users = $this->getServiceLocator()->get('zfcuser_user_mapper'); |
| 267 | 267 | |
| 268 | - $user_id = $this->params()->fromRoute('user_id', ''); |
|
| 269 | - $token = $this->params()->fromRoute('confirmtoken', ''); |
|
| 268 | + $user_id = $this->params()->fromRoute('user_id', ''); |
|
| 269 | + $token = $this->params()->fromRoute('confirmtoken', ''); |
|
| 270 | 270 | if (empty($user_id) || empty($token)) { |
| 271 | 271 | $this->flashMessenger()->addWarningMessage($this->translate("missing parameters")); |
| 272 | 272 | return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array()); |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - if (is_numeric($user_id) ) { |
|
| 275 | + if (is_numeric($user_id)) { |
|
| 276 | 276 | $oUser = $users->findById($user_id); |
| 277 | 277 | } else { |
| 278 | 278 | $oUser = $users->findByUsername($user_id); |
| 279 | 279 | } |
| 280 | - if (!$oUser ) { |
|
| 280 | + if (!$oUser) { |
|
| 281 | 281 | $this->flashMessenger()->addWarningMessage($this->translate("user could not be found")); |
| 282 | 282 | return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array()); |
| 283 | 283 | } |
| 284 | - if (($oUser->getState() != 0) || ($oUser->getToken() != $token) ) { |
|
| 284 | + if (($oUser->getState() != 0) || ($oUser->getToken() != $token)) { |
|
| 285 | 285 | $this->flashMessenger()->addWarningMessage($this->translate("confirmation token is invalid")); |
| 286 | 286 | return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array()); |
| 287 | 287 | } |
@@ -321,26 +321,26 @@ discard block |
||
| 321 | 321 | $this->params()->fromPost(), |
| 322 | 322 | array() |
| 323 | 323 | ); |
| 324 | - $config = $this->getServiceLocator()->get('Config'); |
|
| 325 | - $users = $this->getServiceLocator()->get('zfcuser_user_mapper'); |
|
| 324 | + $config = $this->getServiceLocator()->get('Config'); |
|
| 325 | + $users = $this->getServiceLocator()->get('zfcuser_user_mapper'); |
|
| 326 | 326 | |
| 327 | - $user_id = $this->params()->fromRoute('user_id', ''); |
|
| 328 | - $token = $this->params()->fromRoute('activatetoken', ''); |
|
| 327 | + $user_id = $this->params()->fromRoute('user_id', ''); |
|
| 328 | + $token = $this->params()->fromRoute('activatetoken', ''); |
|
| 329 | 329 | if (empty($user_id) || empty($token)) { |
| 330 | 330 | $this->flashMessenger()->addWarningMessage($this->translate("missing parameters")); |
| 331 | 331 | return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array()); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - if (is_numeric($user_id) ) { |
|
| 334 | + if (is_numeric($user_id)) { |
|
| 335 | 335 | $oUser = $users->findById($user_id); |
| 336 | 336 | } else { |
| 337 | 337 | $oUser = $users->findByUsername($user_id); |
| 338 | 338 | } |
| 339 | - if (!$oUser ) { |
|
| 339 | + if (!$oUser) { |
|
| 340 | 340 | $this->flashMessenger()->addWarningMessage($this->translate("user could not be found")); |
| 341 | 341 | return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array()); |
| 342 | 342 | } |
| 343 | - if (($oUser->getState() != 0) || ($oUser->getToken() != $token) ) { |
|
| 343 | + if (($oUser->getState() != 0) || ($oUser->getToken() != $token)) { |
|
| 344 | 344 | $this->flashMessenger()->addWarningMessage($this->translate("activation token is invalid")); |
| 345 | 345 | return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array()); |
| 346 | 346 | } |
@@ -26,15 +26,15 @@ |
||
| 26 | 26 | class UsersController extends BaseActionController |
| 27 | 27 | { |
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * @var array|\Admin\Model\UserTable |
|
| 31 | - */ |
|
| 32 | - protected $userTable; |
|
| 33 | - |
|
| 34 | - /** |
|
| 35 | - * @var array|\Admin\Model\AclroleTable |
|
| 36 | - */ |
|
| 37 | - protected $AclroleTable; |
|
| 29 | + /** |
|
| 30 | + * @var array|\Admin\Model\UserTable |
|
| 31 | + */ |
|
| 32 | + protected $userTable; |
|
| 33 | + |
|
| 34 | + /** |
|
| 35 | + * @var array|\Admin\Model\AclroleTable |
|
| 36 | + */ |
|
| 37 | + protected $AclroleTable; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * initialize titles and toolbar items |
@@ -144,6 +144,5 @@ |
||
| 144 | 144 | return $this->router->assemble(array(), array('name' => 'zfcuser')); |
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | - |
|
| 148 | - */ |
|
| 147 | + */ |
|
| 149 | 148 | } |