aamirkh521 / yii-user

Automatically exported from code.google.com/p/yii-user
0 stars 0 forks source link

Inconsistency #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In some cases there is Yii::app()->user... and there is also Yii::app()-
>User... This may work on windows but won't it give errors on systems like 
linux

Original issue reported on code.google.com by wapr...@gmail.com on 12 Feb 2010 at 3:57

GoogleCodeExporter commented 8 years ago
PHP Version => 5.2.10-2ubuntu6.4
{{{
$ ./protected/yiic shell
>> print_r (Yii::app()->user);
CWebUser Object
(
    [allowAutoLogin] => 1
    [guestName] => Guest
    [loginUrl] => Array
        (
            [0] => /site/login
        )

    [identityCookie] => 
    [autoRenewCookie] => 
    [_keyPrefix:private] => 19d7c32d9c5b2ca22a93c8893d8c8752
    [_access:private] => Array
        (
        )

    [behaviors] => Array
        (
        )

    [_initialized:private] => 1
    [_e:private] => 
    [_m:private] => 
)

>> print_r (Yii::app()->User);
User Object
(
    [username] => 
    [password] => 
    [email] => 
    [hash] => md5
    [sendActivationMail] => 1
    [loginNotActiv] => 1
    [autoLogin] => 1
    [registrationUrl] => Array
        (
            [0] => user/registration
        )

    [recoveryUrl] => Array
        (
            [0] => user/recovery
        )

    [loginUrl] => Array
        (
            [0] => user/login
        )

    [returnUrl] => Array
        (
            [0] => user/profile
        )

    [returnLogoutUrl] => Array
        (
            [0] => user/login
        )

    [_md:private] => CActiveRecordMetaData Object
        (
            [tableSchema] => CMysqlTableSchema Object
                (
                    [schemaName] => 
                    [name] => {{users}}
                    [rawName] => `{{users}}`
                    [primaryKey] => id
                    [sequenceName] => 
                    [foreignKeys] => Array
                        (
                        )

                    [columns] => Array
                        (
                            [id] => CMysqlColumnSchema Object
                                (
                                    [name] => id
                                    [rawName] => `id`
                                    [allowNull] => 
                                    [dbType] => int(11)
                                    [type] => integer
                                    [defaultValue] => 
                                    [size] => 11
                                    [precision] => 11
                                    [scale] => 
                                    [isPrimaryKey] => 1
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                            [username] => CMysqlColumnSchema Object
                                (
                                    [name] => username
                                    [rawName] => `username`
                                    [allowNull] => 
                                    [dbType] => varchar(20)
                                    [type] => string
                                    [defaultValue] => 
                                    [size] => 20
                                    [precision] => 20
                                    [scale] => 
                                    [isPrimaryKey] => 
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                            [password] => CMysqlColumnSchema Object
                                (
                                    [name] => password
                                    [rawName] => `password`
                                    [allowNull] => 
                                    [dbType] => varchar(128)
                                    [type] => string
                                    [defaultValue] => 
                                    [size] => 128
                                    [precision] => 128
                                    [scale] => 
                                    [isPrimaryKey] => 
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                            [email] => CMysqlColumnSchema Object
                                (
                                    [name] => email
                                    [rawName] => `email`
                                    [allowNull] => 
                                    [dbType] => varchar(128)
                                    [type] => string
                                    [defaultValue] => 
                                    [size] => 128
                                    [precision] => 128
                                    [scale] => 
                                    [isPrimaryKey] => 
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                            [activkey] => CMysqlColumnSchema Object
                                (
                                    [name] => activkey
                                    [rawName] => `activkey`
                                    [allowNull] => 
                                    [dbType] => varchar(128)
                                    [type] => string
                                    [defaultValue] => 
                                    [size] => 128
                                    [precision] => 128
                                    [scale] => 
                                    [isPrimaryKey] => 
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                            [createtime] => CMysqlColumnSchema Object
                                (
                                    [name] => createtime
                                    [rawName] => `createtime`
                                    [allowNull] => 
                                    [dbType] => int(10)
                                    [type] => integer
                                    [defaultValue] => 0
                                    [size] => 10
                                    [precision] => 10
                                    [scale] => 
                                    [isPrimaryKey] => 
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                            [lastvisit] => CMysqlColumnSchema Object
                                (
                                    [name] => lastvisit
                                    [rawName] => `lastvisit`
                                    [allowNull] => 
                                    [dbType] => int(10)
                                    [type] => integer
                                    [defaultValue] => 0
                                    [size] => 10
                                    [precision] => 10
                                    [scale] => 
                                    [isPrimaryKey] => 
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                            [superuser] => CMysqlColumnSchema Object
                                (
                                    [name] => superuser
                                    [rawName] => `superuser`
                                    [allowNull] => 
                                    [dbType] => int(1)
                                    [type] => integer
                                    [defaultValue] => 0
                                    [size] => 1
                                    [precision] => 1
                                    [scale] => 
                                    [isPrimaryKey] => 
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                            [status] => CMysqlColumnSchema Object
                                (
                                    [name] => status
                                    [rawName] => `status`
                                    [allowNull] => 
                                    [dbType] => int(1)
                                    [type] => integer
                                    [defaultValue] => 0
                                    [size] => 1
                                    [precision] => 1
                                    [scale] => 
                                    [isPrimaryKey] => 
                                    [isForeignKey] => 
                                    [_e:private] => 
                                    [_m:private] => 
                                )

                        )

                    [_e:private] => 
                    [_m:private] => 
                )

            [columns] => Array
                (
                    [id] => CMysqlColumnSchema Object
                        (
                            [name] => id
                            [rawName] => `id`
                            [allowNull] => 
                            [dbType] => int(11)
                            [type] => integer
                            [defaultValue] => 
                            [size] => 11
                            [precision] => 11
                            [scale] => 
                            [isPrimaryKey] => 1
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                    [username] => CMysqlColumnSchema Object
                        (
                            [name] => username
                            [rawName] => `username`
                            [allowNull] => 
                            [dbType] => varchar(20)
                            [type] => string
                            [defaultValue] => 
                            [size] => 20
                            [precision] => 20
                            [scale] => 
                            [isPrimaryKey] => 
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                    [password] => CMysqlColumnSchema Object
                        (
                            [name] => password
                            [rawName] => `password`
                            [allowNull] => 
                            [dbType] => varchar(128)
                            [type] => string
                            [defaultValue] => 
                            [size] => 128
                            [precision] => 128
                            [scale] => 
                            [isPrimaryKey] => 
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                    [email] => CMysqlColumnSchema Object
                        (
                            [name] => email
                            [rawName] => `email`
                            [allowNull] => 
                            [dbType] => varchar(128)
                            [type] => string
                            [defaultValue] => 
                            [size] => 128
                            [precision] => 128
                            [scale] => 
                            [isPrimaryKey] => 
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                    [activkey] => CMysqlColumnSchema Object
                        (
                            [name] => activkey
                            [rawName] => `activkey`
                            [allowNull] => 
                            [dbType] => varchar(128)
                            [type] => string
                            [defaultValue] => 
                            [size] => 128
                            [precision] => 128
                            [scale] => 
                            [isPrimaryKey] => 
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                    [createtime] => CMysqlColumnSchema Object
                        (
                            [name] => createtime
                            [rawName] => `createtime`
                            [allowNull] => 
                            [dbType] => int(10)
                            [type] => integer
                            [defaultValue] => 0
                            [size] => 10
                            [precision] => 10
                            [scale] => 
                            [isPrimaryKey] => 
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                    [lastvisit] => CMysqlColumnSchema Object
                        (
                            [name] => lastvisit
                            [rawName] => `lastvisit`
                            [allowNull] => 
                            [dbType] => int(10)
                            [type] => integer
                            [defaultValue] => 0
                            [size] => 10
                            [precision] => 10
                            [scale] => 
                            [isPrimaryKey] => 
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                    [superuser] => CMysqlColumnSchema Object
                        (
                            [name] => superuser
                            [rawName] => `superuser`
                            [allowNull] => 
                            [dbType] => int(1)
                            [type] => integer
                            [defaultValue] => 0
                            [size] => 1
                            [precision] => 1
                            [scale] => 
                            [isPrimaryKey] => 
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                    [status] => CMysqlColumnSchema Object
                        (
                            [name] => status
                            [rawName] => `status`
                            [allowNull] => 
                            [dbType] => int(1)
                            [type] => integer
                            [defaultValue] => 0
                            [size] => 1
                            [precision] => 1
                            [scale] => 
                            [isPrimaryKey] => 
                            [isForeignKey] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                )

            [relations] => Array
                (
                    [profile] => CHasOneRelation Object
                        (
                            [joinType] => LEFT OUTER JOIN
                            [on] => 
                            [alias] => 
                            [with] => Array
                                (
                                )

                            [name] => profile
                            [className] => Profile
                            [foreignKey] => user_id
                            [select] => *
                            [condition] => 
                            [params] => Array
                                (
                                )

                            [group] => 
                            [having] => 
                            [order] => 
                            [_e:private] => 
                            [_m:private] => 
                        )

                )

            [attributeDefaults] => Array
                (
                    [activkey] => 
                    [createtime] => 0
                    [lastvisit] => 0
                    [superuser] => 0
                    [status] => 0
                )

            [_model:private] => User Object
                (
                    [username] => 
                    [password] => 
                    [email] => 
                    [hash] => md5
                    [sendActivationMail] => 1
                    [loginNotActiv] => 
                    [autoLogin] => 1
                    [registrationUrl] => Array
                        (
                            [0] => user/registration
                        )

                    [recoveryUrl] => Array
                        (
                            [0] => user/recovery
                        )

                    [loginUrl] => Array
                        (
                            [0] => user/login
                        )

                    [returnUrl] => Array
                        (
                            [0] => user/profile
                        )

                    [returnLogoutUrl] => Array
                        (
                            [0] => user/login
                        )

                    [_md:private] => CActiveRecordMetaData Object
 *RECURSION*
                    [_new:private] => 
                    [_attributes:private] => Array
                        (
                        )

                    [_related:private] => Array
                        (
                        )

                    [_c:private] => 
                    [_pk:private] => 
                    [_errors:private] => Array
                        (
                        )

                    [_validators:private] => 
                    [_scenario:private] => 
                    [_e:private] => 
                    [_m:private] => 
                )

        )

    [_new:private] => 1
    [_attributes:private] => Array
        (
            [activkey] => 
            [createtime] => 0
            [lastvisit] => 0
            [superuser] => 0
            [status] => 0
        )

    [_related:private] => Array
        (
        )

    [_c:private] => 
    [_pk:private] => 
    [_errors:private] => Array
        (
        )

    [_validators:private] => 
    [_scenario:private] => insert
    [_e:private] => 
    [_m:private] => 
)
}}}

Original comment by mish...@gmail.com on 13 Feb 2010 at 12:29