HCE Project DC service web UI
0.2
Hierarchical Cluster Engine DC service web UI
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
ActivationController.php
Go to the documentation of this file.
1
<?php
2
3
class
ActivationController
extends
Controller
4
{
5
public
$defaultAction
=
'activation'
;
6
10
public
function
actionActivation
()
11
{
12
$email = $_GET[
'email'
];
13
$activkey = $_GET[
'activkey'
];
14
if
($email && $activkey) {
15
$find =
User::model
()->notsafe()->findByAttributes(array(
'email'
=> $email));
16
if
(isset($find) && $find->status) {
17
$this->render(
'/user/message'
, array(
'title'
=>
UserModule::t
(
"User activation"
),
'content'
=>
UserModule::t
(
"You account is active."
)));
18
} elseif (isset($find->activkey) && ($find->activkey == $activkey)) {
19
$find->activkey =
UserModule::encrypting
(microtime());
20
$find->status = 1;
21
$find->save();
22
$this->render(
'/user/message'
, array(
'title'
=>
UserModule::t
(
"User activation"
),
'content'
=>
UserModule::t
(
"You account is activated."
)));
23
}
else
{
24
$this->render(
'/user/message'
, array(
'title'
=>
UserModule::t
(
"User activation"
),
'content'
=>
UserModule::t
(
"Incorrect activation URL."
)));
25
}
26
}
else
{
27
$this->render(
'/user/message'
, array(
'title'
=>
UserModule::t
(
"User activation"
),
'content'
=>
UserModule::t
(
"Incorrect activation URL."
)));
28
}
29
}
30
}
app
protected
modules
user
controllers
ActivationController.php
Generated on Tue Jun 30 2015 20:12:36 for HCE Project DC service web UI by
1.8.1.2